let data = [1, 1, 3, 5, 5];
const sum = data.reduce((prev, v) => prev + v, 0);
console.log(sum); // 15
const mean = sum / data.length;
console.log(mean); // 3
const stddev = Math.sqrt(
  data
    .map((v) => v - mean)
    .map((v) => v * v)
    .reduce((v1, v2) => v1 + v2, 0) /
    (data.length - 1)
);
console.log(stddev); // 2
